package com.cyzy.homework.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 作业提交DTO
 */
@Data
public class HomeworkSubmitDTO {
    
    private Long id;
    
    @NotNull(message = "作业ID不能为空")
    private Long homeworkId;
    
    @NotNull(message = "学生ID不能为空")
    private String userId;
    
    private String content;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime submitTime;
    
    private Integer status = 0;
    
    private Integer score;
    
    private String comment;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gradeTime;
    
    private String graderId;
    
    // 学生信息
    private String studentName;
    private String studentAvatar;
    
    // 作业信息
    private String homeworkTitle;
    private String homeworkContent;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime homeworkDeadline;
    
    // 文件列表
    private List<HomeworkFileDTO> files;
}
